package chen.videoedit.continuousplay;


import android.view.Surface;

import java.io.IOException;
import java.util.ArrayList;

/**
 * Created by 15705 on 2016/11/15.
 * 解码线程
 */
public class DecoderVideoThread extends VideoDecoderCore implements Runnable {
    public DecoderVideoThread(ArrayList<String> list, Surface surface) {
        super(list, surface);
    }

    @Override
    public void run() {
        try {
            prepareDecode();
        } catch (IOException e) {
            e.printStackTrace();
        }
        doDecode();
    }

    public void startPlaying() {
        new Thread(this, "MyDecoder").start();
    }

    public void stopPlaying() {
        super.stop = true;
    }

}
